﻿#include"test.h"
#include"XQAlgorithm.h"
#include"XQLog.hpp"
void compressTest()
{
	QByteArray data = "1231313adaaaaaaaaaaaaaaaaaaaaaaaaaasssssssssssddddddddddd";
	auto gzip = gzipCompress(data);
	qDebug() <<"压缩前大小:"<<data.size()<<"\t数据:"<<data;
	qDebug() << "压缩后大小:" << gzip.size() << "\t数据:" << gzip;
	auto uzip = gzipUnCompress(gzip);
	qDebug() << "解压后大小:" << uzip.size() << "\t数据:" << uzip;

	auto deflate=deflateCompress(data);
	qDebug() << "压缩后大小:" << deflate.size() << "\t数据:" << deflate;
	auto udeflate = deflateUnCompress(deflate);
	qDebug() << "解压后大小:" << udeflate.size() << "\t数据:" << udeflate;
}